class LabelDate < ActiveRecord::Base
  belongs_to :full_date
  belongs_to :label

  #Constants
  DATE_EVENTS = %w(Founded Closed) 
  
  #Validations
  validates_inclusion_of :event,
                         :in => DATE_EVENTS,
                         :message => "Not a valid date event."
  validates_presence_of :label, :full_date
  
  def day
    return full_date.day
  end
  
  def month
    return full_date.month
  end
  
  def year
    return full_date.year
  end
  
  def date_string
    return full_date
  end
  
  def date_string_with_month
    return full_date.with_month
  end
end
